<?php
	session_start();
 ?>
<script src="js/quiz.js" language="javascript"></script>
<script src="js/student.js" language="javascript"></script>
<script type="text/javascript" src="js/datepicker.js"></script>
<?php
	require_once('../includes/user.php');
	$user=new User();
	$y_row=$user->getUserProfile($_SESSION['id']);
	$date=date('Y-m-d');
	$qres=$user->query("select * from quiz_names where '$date' BETWEEN from_date AND to_date AND (year_id=0 OR year_id='$y_row[year]') AND active=1 ");
	$ptm_ct=$user->recCount('points'," profileid='$_SESSION[id]' AND inbox=0 ");
	$m_ct=$user->recCount('messages'," receipient='$_SESSION[id]' AND inbox=0 ");
	$quiz_ct=$user->recCount('quiz_history'," profile_id='$_SESSION[id]' AND inbox=0 ");
	$inbox=$ptm_ct+$m_ct+$quiz_ct;
?>

<div class="highlight" id="div_news">
    		<h3 align="left"><span class="profile">General</span></h3>
    		<div align="left">
    		  <ul>
    		    <li id="profile" onclick="show_profile()"><span class="profile">Profile</span></li>
    		    <li id="inbox" onclick="showStudentInbox()"><span class="profile">Inbox
   		        <?php 
			if($inbox>0)
				echo '(<strong>'.$inbox.'</strong>)';
			 ?>
  		      </span></li>
    		    <li id="quiz" onClick="attendQuiz()"><span class="profile">Quiz
   		        <?php 
			if(mysql_num_rows($qres)>0)
				echo '(<strong>'.mysql_num_rows($qres).'</strong>)';
			 ?>
  		      </span></li>
  		    </ul>
  		  </div>
</div>
<div class="highlight" id="div_request">
  <h3 align="left"><span class="profile">Point System</span></h3>
  <div align="left">
    <ul>
      <li id="points" onclick="point_request()"><span class="profile">Points</span></li>
      <li id="overview" onclick="stu_pt_overview()"><span class="profile">Overview</span></li>
      <li><span class="profile" onclick="show_awards()">Awards</span></li>
    </ul>
  </div>
</div>
<div class="highlight" id="div_settings">
  <h3 align="left"><span class="profile">Extras</span></h3>
  <div align="left">
    <ul>
      <li id="dashboard" onclick="show_dashboard()"><span class="profile">Dashboard</span></li>
      <li id="change_pass" onClick="change_pass()"><span class="profile">Change Password</span></li>
    </ul>
  </div>
  <ul>
  </ul>
</div>
